/*
 * TwoDCDP.c
 *
 *  Created on: Aug 26, 2011
 *      Author: ryan
 */
#include <stdio.h>
#include "Parameters.h"
#include "Communication.h"
#include "KEY_VALUE.h"
#include "MapReducer.h"
#include "ImageIO.h"
#include "Scheduler.h"
#include "CPU_MapReducer.h"
#include "GPU_MapReducer.h"

int main(int argc, char *argv[]) {
	Parameters para;
	if(para.analizeOpt(argc, argv) < 3){
		printf("Pleas set the arg properly!\n");
	}
	if(para.devide != -1){
		Scheduler::setDevide(para.devide);
	}
	CPU_MapReducer cpu;
	GPU_MapReducer gpu;
	Scheduler::setCPUMapReducer(&cpu);
	Scheduler::setGPUMapReducer(&gpu);
	Scheduler::submit(para.tasks, argc, argv);
	return 0;
}
